* Table 4: CONTINUED OWNERSHIP AND USE OF INTERVENTION STOVES

use "${output}panel_r0_r1_r2.dta", clear // Load merged analysis panel

********************************************************************************

* Keep households surveyed in each round
keep if sample_household == 1

********************************************************************************

* Analyses

local model_1 "i.treatment##i.surveyround, absorb(hh_id) vce(cluster uniquegrp) nocons"
local model_2 "i.treatment##i.chirag_strata##i.surveyround, absorb(hh_id) vce(cluster uniquegrp) nocons"

estimates clear
foreach var of varlist intervention_stove_own intervention_stove_use {

	sum `var' if surveyround == 0 & treatment == 0 & chirag_strata == 0
	local `var'_m = `r(mean)'
	qui autofmt, input(``var'_m') dec(2) strict
	local `var'_m = `r(output1)'

	forval i = 1/2 {

		// Estimation
		reghdfe `var' `model_`i''
		estimates store `var'_`i'

		// Test of difference between two triple-diff. estimands
		capture noisily test 1.treatment#1.chirag_strata#1.surveyround = 1.treatment#1.chirag_strata#2.surveyround

	}
}

********************************************************************************

// Generate table

estout intervention_stove_own_1 intervention_stove_own_2 intervention_stove_use_1 intervention_stove_use_2 ///
	using "${results}/table_continued_ics_adoption_use.tex", replace style(tex) ///
	cells("b(fmt(a2) star)" se(par fmt(a2))) ///
	keep(1.surveyround 2.surveyround ///
		1.treatment#1.surveyround 1.treatment#2.surveyround ///
		1.chirag_strata#1.surveyround 1.chirag_strata#2.surveyround ///
		1.treatment#1.chirag_strata#1.surveyround 1.treatment#1.chirag_strata#2.surveyround) ///
	stats(N r2_a, fmt(%15.0gc a2) labels("\(N\)" "Adjusted \(R^2\)")) ///
  	starlevels(* 0.10 ** 0.05 *** 0.01) ///
    collabels(none) mlabel(none) ///
	varlabels(1.surveyround "\({POST}_1\)" ///
			2.surveyround "\({POST}_2\)" ///
			1.treatment#1.surveyround "\({TREATMENT}_j \times {POST}_1\)" ///
			1.treatment#2.surveyround "\({TREATMENT}_j \times {POST}_2\)" ///
			1.chirag_strata#1.surveyround "\({NGO}_j \times {POST}_1\)" ///
			1.chirag_strata#2.surveyround "\({NGO}_j \times {POST}_2\)" ///
			1.treatment#1.chirag_strata#1.surveyround "\({TREATMENT}_j \times {NGO}_j \times {POST}_1\)" ///
			1.treatment#1.chirag_strata#2.surveyround "\({TREATMENT}_j \times {NGO}_j \times {POST}_2\)" ///
				, elist(1.surveyround " \addlinespace" ///
						2.surveyround " \addlinespace" ///
						1.treatment#1.surveyround " \addlinespace" ///
						1.treatment#2.surveyround " \addlinespace" ///
						1.chirag_strata#1.surveyround " \addlinespace" ///
						1.chirag_strata#2.surveyround " \addlinespace" ///
						1.treatment#1.chirag_strata#1.surveyround " \addlinespace") ///
				) ///
	prehead(  ///
		"\begin{table}" ///
		"\centering" ///
		"\caption{Effect of promotion on intervention ICS adoption in matched NGO/non-NGO villages}" ///
		"\begin{adjustbox}{max width=\textwidth}" ///
		"\label{t:continued-own-use}" ///
		"\begin{threeparttable}" ///
		"\begin{tabular}{lcccc}" ///
		"\toprule" ///
        "& (1) & (2) & (3) & (4) \\ \cmidrule(lr){2-3} \cmidrule(lr){4-5}" ///
        "& \multicolumn{2}{c}{$\mathbbm{1} \left( \text{Owns intervention ICS} \right)$} &  \multicolumn{2}{c}{$\mathbbm{1} \left( \text{Uses intervention ICS} \right)$} \\  \midrule" /// 
		)  ///
	prefoot("\midrule" ///
		"Baseline non-NGO control mean & `intervention_stove_own_m' & `intervention_stove_own_m' & `intervention_stove_use_m' & `intervention_stove_use_m' \\" ///
		"Household fixed-effects & Yes & Yes & Yes & Yes \\" ///
		)  ///
	postfoot("\bottomrule" ///
		"\end{tabular}" ///
		"\begin{tablenotes}" ///
		"{\setlength\labelsep{0pt}" ///
		"\footnotesize" ///
		"\item \textit{Notes.} The outcomes variables are ownership (columns 1--2) and use (columns 3--4) of at least one of the two intervention ICS as measured during baseline, and midline and endline follow-up surveys (conducted approximately three and fifteen months after the start of the intervention, respectively). The outcome variable for ownership is an indicator that equals 1 if household \(i\) in hamlet \(j\) reports owning at least one of the two ICS promoted during the intervention in survey round \(t\); for use, it is an indicator that equals 1 if the household---conditional on ownership---reports having used at least one of these two ICS in the past week. The even-numbered columns present the results of estimating the triple-differences specification outlined in Equation \eqref{e:triple-diff}. The accompanying odd-numbered columns present results from estimating a double-differences specification without NGO-specific interactions for comparison. Standard errors (in parentheses) are clustered at the hamlet level. \sym{*} \(p<0.10\), \sym{**} \(p<0.05\), \sym{***} \(p<0.01\).}" ///
		"\end{tablenotes}" ///
		"\end{threeparttable}" ///
		"\end{adjustbox}" ///
		"\end{table}" ///
		)
